{namespace dkpoints.errors.templates}


/**
 * Generic error statement + Back button
 * @param message The message to display to the user.
 */
{template .genericError}
<div class="error_desc">
  {$message}
</div>
{/template}

/**
 * If the user has somehow entered a location that doesn't exist, show this
 * error.
 */
{template .http404}
<div class="error_desc">
  Nothing here. Please go back.
</div>
{/template}

/**
 * If a user is either not logged in, or logged in as a non-admin.
 * Values for auth status and required auth:
 *    0 - No auth required (requiredAuth should never be 0)
 *    1 - Normal user
 *    2 - Admin user
 * @param authState The authStatus of the user.
 * @param requiredAuth The required auth status for the page.
 */
{template .notAuthorized}
<div class="error_desc">
  {if $requiredAuth == 1}
    {if $authState == 0}
      You must log into a registered user account to view this page.
    {else}
      {call .notAuthorizedScrewedUp /}
    {/if}
  {elseif $requiredAuth == 2}
    {if $authState == 0}
      You must log into an administrator account to view this page.
    {elseif $authState == 1}
      You are not authorized to view this page.
    {else}
      {call .notAuthorizedScrewedUp /}
    {/if}
  {else}
    {call .notAuthorizedScrewedUp /}
  {/if}
</div>
{/template}

/**
 * The user shouldn't be seeing a No Auth error.  Something's gone horribly
 * wrong.
 */
{template .notAuthorizedScrewedUp private="true"}
You should not be viewing this message. Please tell report this bug along with
a screenshot and the URL you are trying to view. Apologies for the
inconvenience.
{/template}

/**
 * Show this error for functionality that hasn't yet been implemented.
 */
{template .notImplemented}
 <div class="error_desc">
   This feature hasn't been implemented yet. Please be patient.
 </div>
{/template}
